#define USECPP

#ifndef USECPP
	#include "stdio.h"
#else
	#include <iostream>
	using namespace std;
#endif

#define MAXLEN 150

int main()
{
	char s[7];
	unsigned char blen,rlen,point=0;
	int i,j,k,m;
	int n;
	unsigned char sum[MAXLEN];
	unsigned char temp[MAXLEN];
	unsigned char base[7];
	bool has_head,has_tail;
	char pt_pos,tail_zero,head_zero;
	unsigned char head_max;
	unsigned char carry;
	unsigned r_pos;
	unsigned char t;

#ifndef USECPP
	while(scanf("%s%d",s,&n)==2)
#else
	while(cin>>s>>n)
#endif	
	{
		point=0;
		s[6]='\0';
		blen=0;
		for(i=6;i>=0;i--)
		{
			if(s[i]=='.')
				point=blen;
			else if((s[i] & 0xf0) == 0x30)
			{
				base[blen] = (s[i] & 0x0f);
				sum[blen]=base[blen];
				blen++;
			}
			s[i]=0;
		}

		rlen=blen;

		for(i=1;i<n;i++)
		{

			for(j=0;j<rlen;j++)
				temp[j]=sum[j];
			for(j=0;j<MAXLEN;j++)
				sum[j]=0;

			for(k=0;k<blen;k++)
			{
				carry=0;
				r_pos=k;
				for(m=0;m<rlen;m++)
				{
					t=base[k]*temp[m]+carry+sum[r_pos];
					sum[r_pos++]=t%10;
					carry=t/10;
				}
				if(carry>0)
					sum[r_pos++]=carry;
			}
			rlen=r_pos;
		}

		has_head=false;
		has_tail=false;
		pt_pos=point*n;

		if(rlen<=pt_pos)
		{
			;//do not output
		}
		else
		{
			head_max=rlen-pt_pos;
			head_zero=rlen-1;
			while(head_zero>=pt_pos && sum[head_zero]==0 )
				head_zero--;
			head_zero=rlen-head_zero-1;
			if(head_zero==head_max)
				;//do no output
			else
			{
				//output the trimmed string
				has_head=true;
				for(i=rlen-1-head_zero;i>=pt_pos;i--)
#ifndef USECPP
					printf("%c",sum[i]|0x30);
#else
					cout <<(char)(sum[i]|0x30);
#endif
			}
		}


		if(rlen<pt_pos)
		{
			for(i=rlen;i<pt_pos;i++)
				sum[i]=0;
		}

		tail_zero=0;
		while(tail_zero<pt_pos && sum[tail_zero]==0 )
			tail_zero++;

		if(tail_zero==pt_pos)
			;//do not output
		else
		{
#ifndef USECPP
			printf(".");
#else
			cout <<'.';
#endif

			has_tail=true;
			for(i=pt_pos-1;i>=tail_zero;i--)
#ifndef USECPP
				printf("%c",sum[i]|0x30);
#else
				cout <<(char)(sum[i]|0x30);
#endif
		}

		if(!has_head && !has_tail)
#ifndef USECPP
			printf("0");
#else
			cout <<'0';
#endif

#ifndef USECPP
		printf("\n");
#else
		cout <<endl;
#endif

	}
	return 0;
}
